-- GENERATED SPELL FOR [Windyreed Scavenger] --


function spell0_17139(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(12024,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17139', 5293, 1)
end

function spell1_17139(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(10277,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17139', 500, 1)
end

function Sorts_17139(pUnit, Event)
local choix_sorts_17139 = math.random(0, 1)
if choix_sorts_17139 == 0 then
pUnit:RegisterEvent('spell0_17139', 1, 1)
end
if choix_sorts_17139 == 1 then
pUnit:RegisterEvent('spell1_17139', 1, 1)
end
end

function mob17139_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17139', math.random(1500, 3000), 1)
end

function mob17139_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17139_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17139_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17139, 1, 'mob17139_Action')
RegisterUnitEvent(17139, 2, 'mob17139_Leave')
RegisterUnitEvent(17139, 3, 'mob17139_Kill')
RegisterUnitEvent(17139, 4, 'mob17139_Die')
